<?php

include('../lib/conn.php');

$username = $_REQUEST['username'];
$password = $_REQUEST['password'];

$sql = "select * from users where user_name='$username' and pass_word='$password'";

$res = $mysqli->query($sql);

if($res->num_rows == 1){
    echo "<script>alert('登陆成功');location.href='../html/index.html';</script>";
}else{
    echo "<script>alert('登陆失败');location.href='../html/login.html';</script>";
}
?>